const Router = require("@koa/router");

const authRouter = new Router();

// 登录的中间件
const { login, success } = require("../controller/auth.controller");

// 登录校验的中间件
const { verifyLogin, verifyAuth } = require("../middleware/auth.middleware");
const userRequest = require("../request/user.request");

authRouter.post("/login", userRequest, verifyLogin, login);
authRouter.get("/test", verifyAuth, success);

module.exports = authRouter;
